const express = require("express");
const {
  list,
  add,
  update,
  del,
  details,
} = require("../../controllers/learn/coursesController");
const router = express.Router();

/**
 * 查询所有课程信息
 * GTE  /courses/list
 */
router.get("/list", list);

/**
 * 新增课程
 * POST /courses/add
 */
router.post("/add", add);

/**
 * 更新课程
 * PUT /courses/update
 */
router.put("/update", update);

/**
 * 删除课程
 * DELETE /courses/delete
 */
router.delete("/delete", del);

/**
 * 查询课程详情
 * GET /courses/details
 */
router.get("/details", details);

module.exports = router;
